
class TrailerType  {
  List<String> lpns;//lpn
  String trailerId;//车次Id
  String trailerName;//车牌号Id
  int type;
  String closeDoorPath;//closeDoor图片路径
  List<TrailerOBLPN> bindLpns = new List();//绑定的lpn

  TrailerType({this.lpns, this.trailerId, this.trailerName, this.type, this.closeDoorPath, this.bindLpns});

  factory TrailerType.fromJson(Map<String, dynamic> json) {
    return TrailerType(
      lpns: json['lpns'] == null ? null : new List<String>.from(json['lpns']) as List<String>,
      trailerId: json["trailerId"],
      trailerName: json["trailerName"],
      type: json["type"],
      closeDoorPath: json["closeDoorPath"],
      bindLpns: json['bindLpns'] == null ? null : (new List<dynamic>.from(json['bindLpns']).map((userJson) => TrailerOBLPN.fromJson(userJson)).toList()),
    );
  }

}

class TrailerOBLPN{
  String id;
  String lpn;
  String trackingCode;
  String createdDatetime;

  TrailerOBLPN({this.id, this.lpn, this.trackingCode, this.createdDatetime});

  factory TrailerOBLPN.fromJson(Map<String, dynamic> json) {
    return TrailerOBLPN(id: json["id"], lpn: json["lpn"], trackingCode: json["trackingCode"], createdDatetime: json["createdDatetime"],);
  }

}

class TrailerBean{
  CurrentDayRespVoDTO currentDayRespVo;
  List<String> pendingOutboundLpns;

  TrailerBean({this.currentDayRespVo, this.pendingOutboundLpns});

  factory TrailerBean.fromJson(Map<String, dynamic> json) {
    return TrailerBean(
      currentDayRespVo: CurrentDayRespVoDTO.fromJson(json["currentDayRespVo"]),
      pendingOutboundLpns: json['pendingOutboundLpns'] == null ? null : new List<String>.from(json['pendingOutboundLpns']) as List<String>,
    );
  }
//

}

class CurrentDayRespVoDTO {
  int picked;
  int labeled;
  Object bounded;
  int loaded;

  CurrentDayRespVoDTO({this.picked, this.labeled, this.bounded, this.loaded});

  factory CurrentDayRespVoDTO.fromJson(Map<String, dynamic> json) {
    return CurrentDayRespVoDTO(
      picked: json["picked"],
      labeled: json["labeled"],
      bounded: json["bounded"],
      loaded: json["loaded"],
    );
  }
}

class TrailerIBLPNQr{
  int trailerId;
  String trailerName;
  int type;
  String sku;
  int qty;
  List<String> lpns;
  List<String> trks;

  Map<String, dynamic> toJson() {
    return {
      "trailerId": this.trailerId,
      "trailerName": this.trailerName,
      "type": this.type,
      "sku": this.sku,
      "qty": this.qty,
      "lpns": this.lpns,
      "trks": this.trks,
    };
  }
}

class RemoveLpn {
  int id;
  int trailerId;

  Map<String, dynamic> toJson() {
    return {
      "id": this.id,
      "trailerId": this.trailerId,
    };
  }
}

class TrailerQr {
  String trailerId;
  String closeDoor;

  Map<String, dynamic> toJson() {
    return {
      "trailerId": this.trailerId,
      "closeDoor": this.closeDoor,
    };
  }
}